﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eTerm.PlugIn.NCore
{
    public class PlugInEventArgs : EventArgs
    {
        public IPlugIn PlugIn { private set; get; }

        /// <summary>
        /// 业备编号
        /// </summary>
        public string BusinessNo { get; set; }

        /// <summary>
        /// 处理类型
        /// </summary>
        public EventType NotifyType { get; set; }

        /// <summary>
        /// 提示信息
        /// </summary>
        public string Notify { get; set; }

        public PlugInEventArgs(IPlugIn PlugIn)
            : this(PlugIn, string.Empty, EventType.NONE, string.Empty)
        {
        }

        public PlugInEventArgs(IPlugIn PlugIn, string BusinessNo, EventType NotifyType, string Notify)
        {
            this.PlugIn = PlugIn;
            this.BusinessNo = BusinessNo;
            this.Notify = Notify;
            this.NotifyType = NotifyType;

        }
    }

    [Flags]
    public enum EventType : int
    {
        NONE = 1,

        DEBUG = 2,

        INFO = 4,

        ERROR = 8,

        WARNING = 16,

        SUCCESS = 32,

        INSTRUCT = 64,
    }
}
